package constructor;
/**
 * @Author forsake
 * @Description 构造器不能有返回值，可以被重载，但是不能被重写
 * @Date 14:18 2022/12/1
 **/
public class TestConstructor {
    private String string;
    private String string1;
    public TestConstructor() {
    }
    public TestConstructor(String s) {
        this.string = s;
    }

    public TestConstructor(String string, String string1) {
        this.string = string;
        this.string1 = string1;
    }

    public String TestConstructor() {
        System.out.println(this.string);
        return "aaa";
    }

    public static void main(String[] args) {
        TestConstructor testConstructor = new TestConstructor();
        TestConstructor fang = new TestConstructor("fang");
        System.out.println(fang.TestConstructor());
    }
}
